<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Symbol概述</title>
  </head>
  <body>
    <p>Symbol对象表示唯一得值</p>
    <pre>
      let s1=Symbol()
      let s2=Symbol()
      console.log(s1 == s2); //false
    </pre>
    <p>为了便于识别可以添加参数</p>
    <pre>
       let s3 = Symbol("s3");
       let s4 = Symbol("s4");
       console.log(s3); // Symbol(s3)
       console.log(s4); // Symbol(s4)
    </pre>
  </body>
</html>
<script>
  let s1 = Symbol();
  let s2 = Symbol();
  console.log(s1 == s2); //false
  let s3 = Symbol("s3");
  let s4 = Symbol("s4");
  console.log(s3); // Symbol(s3)
  console.log(s4); // Symbol(s4)
</script>
